<div align="right">
	<a href="expensesCreateOrEdit.groovy?transcationKey=0">Add</a>
</div>
<div data-role="collapsible-set">
<%
use(groovy.time.TimeCategory) {
	int timeZoneHour = session.userTimeZoneHour as int
	int timeZoneMinute = session.userTimeZoneMinute as int

	def transcations = request.transcations
	def transcationTags = request.transcationTags
	int count = 0;
	transcations.each { transcation ->
		count++;
		def transcationTag = transcationTags[transcation.key.id]
		def amount = String.format("%.2f", transcation.amount)
		def time = transcation.createdTime + timeZoneHour.hours + timeZoneMinute.minutes
		def createdTime = time.format('dd-MM-yyyy HH:mm')
%>
	<div data-role="collapsible">
   		<h3>
   		<a href="expensesCreateOrEdit.groovy?transcationKey=${transcation.key.id}">$transcation.key.id</a>
   		&nbsp;$amount&nbsp;$transcation.description
   		</h3>
   		<p>$transcationTag $createdTime</p>
	</div>
<% 
	}
}	
%>
</div>
<div align="right">
	<a href="expensesCreateOrEdit.groovy?transcationKey=0">Add</a>
</div>
